package com.tuo51.foudation.constant;

import lombok.Setter;

/**
 * *******************************
 * Created by Ron.
 * form com.tuo51
 * on 2018/3/14
 * *******************************
 */
public class CourseConstant {

    public static final String TOTAL_CORE_COMPETENCE ="S|A|T";
    public static final String TOTAL_INTEGRATEDSKILL ="精细动作|大肢体运动|记忆力|语言表达|自我服务|自我学习";

    public enum CourseType{
        SAT(1, "SAT早教"),
        AREA_BUILD(2, "园区自建"),
        PUBLIC(3, "公共课程"),
        KX_THEME(4, "邦思课程体系")
        ;

        @Setter
        private int code;

        @Setter
        private String value;

        CourseType(int code, String value){
            this.code = code;
            this.value = value;
        }

        public int codeOf(){
            return code;
        }

        public String valueOf(){
            return value;
        }

        public CourseType get(int code){
            for (CourseType type : values()) {
                if (type.codeOf()==code)
                    return type;
            }
            return null;
        }
    }

    public enum KXCourseType{
        KX_MAIN(1, "邦思课程体系"),
//        KX_AREA_ACTIVITY(2, "区域活动"),
//        KX_FAMILY_ACTIVITY(3, "亲子活动"),
//        KX_FEELING_GAME(4, "感统游戏")
        ;

        @Setter
        private int code;

        @Setter
        private String value;

        KXCourseType(int code, String value){
            this.code = code;
            this.value = value;
        }

        public int codeOf(){
            return code;
        }

        public String valueOf(){
            return value;
        }

        public KXCourseType get(int code){
            for (KXCourseType type : values()) {
                if (type.codeOf()==code)
                    return type;
            }
            return null;
        }
    }
    
    public enum CourseAreaStatus{
        NON_AUDIT(0, "待审核"),
        APPROVED(1, "已审核"),
        REJECTED(2, "已拒绝"),
        DISABLE(3, "已禁用");


        @Setter
        private int code;

        @Setter
        private String value;

        CourseAreaStatus(int code, String value){
            this.code = code;
            this.value = value;
        }

        public int codeOf(){
            return code;
        }

        public String valueOf(){
            return value;
        }

        public CourseAreaStatus get(int code){
            for (CourseAreaStatus status : values()) {
                if (status.codeOf()==code)
                    return status;
            }
            return null;
        }
    }

    public enum CourseOfficialStatus{
        ACTIVE(0, "已启用"),
        DISABLE(1, "已禁用");


        @Setter
        private int code;

        @Setter
        private String value;

        CourseOfficialStatus(int code, String value){
            this.code = code;
            this.value = value;
        }

        public int codeOf(){
            return code;
        }

        public String valueOf(){
            return value;
        }

        public CourseOfficialStatus get(int code){
            for (CourseOfficialStatus status : values()) {
                if (status.codeOf()==code)
                    return status;
            }
            return null;
        }
    }



    public enum Category{
        NURSERY(1, "托班"),
        EARLY(2, "早教"),
        AREA_BUILD(3,"园区自建"),
        KX_THEME(4,"康轩课程"),
        NURSERY_DAILY_LIVE(5,"托班一日生活");

        @Setter
        private int code;

        @Setter
        private String value;

        Category(int code, String value){
            this.code = code;
            this.value = value;
        }

        public int codeOf(){
            return code;
        }

        public String valueOf(){
            return value;
        }

        public Category get(int code){
            for (Category category : values()) {
                if (category.codeOf()==code)
                    return category;
            }
            return null;
        }
    }

    public enum Template{
        THEME(1, "主题课"),
        OLD_SAT(2, "老sat课"),
        AREA_BUILD(3, "园区自建"),
        GENERAL(5, "通用模板"),
    	KX_THEME(4, "康轩课程");
    	

        @Setter
        private int code;

        @Setter
        private String value;

        Template(int code, String value){
            this.code = code;
            this.value = value;
        }

        public int codeOf(){
            return code;
        }

        public String valueOf(){
            return value;
        }

        public Template get(int code){
            for (Template template : values()) {
                if (template.codeOf()==code)
                    return template;
            }
            return null;
        }
    }

    public enum PrepareStatus{
        NON_PREPARE(0, "未备课"),
        PREPARED(1, "已备课"),
        NON_AUDIT(2, "待审核"),
        REJECTED(3, "未通过"),
        APPROVED(4, "已通过");

        @Setter
        private int code;

        @Setter
        private String value;

        PrepareStatus(int code, String value){
            this.code = code;
            this.value = value;
        }

        public int codeOf(){
            return code;
        }

        public String valueOf(){
            return value;
        }

        public PrepareStatus get(int code){
            for (PrepareStatus status : values()) {
                if (status.codeOf()==code)
                    return status;
            }
            return null;
        }
    }



    public enum CourseStatus{
        STARTING(0, "进行中"),
        PROCESSED(1, "已完成"),
        NO_PROCESS(2, "未处理");

        @Setter
        private int code;

        @Setter
        private String value;

        CourseStatus(int code, String value){
            this.code = code;
            this.value = value;
        }

        public int codeOf(){
            return code;
        }

        public String valueOf(){
            return value;
        }

        public CourseStatus get(int code){
            for (CourseStatus status : values()) {
                if (status.codeOf()==code)
                    return status;
            }
            return null;
        }
    }
}
